<?php
/**
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file license.txt or that can be found at 
 * http://code.google.com/p/billboardce/wiki/License.
 *
 * @package    Ot_Plugin_Interface
 * @category   Library
 * @license    http://code.google.com/p/billboardce/wiki/License New BSD License
 * @version    SVN: $Id: $
 */

/**
 * Generic plugin interface to extend functionality of certain applications
 *
 * @package    Ot_Plugin_Interface
 * @category   Library
 */
interface Ot_Plugin_Interface {
    
	/**
     * Subform to add a new trigger
     *
     * @return Zend_Form element
     */
    public function addSubForm();
    
    /**
     * Action called when the addForm is processed
     *
     * @param array $data
     */
    public function addProcess($data);
    
    /**
     * Subform to edit an existing trigger
     *
     * @param mixed $id
     * @return Zend_Form element
     */
    public function editSubForm($id);
    
    /**
     * Action called when the editForm is processed
     *
     * @param array $data
     */
    public function editProcess($data);
    
    /**
     * Action called when a request is processed to delete a trigger
     *
     * @param mixed $id
     * @return boolean
     */
    public function deleteProcess($id);
    
    /**
     * retrieves trigger with a specific ID
     *
     * @param mixed $id
     * @return Zend_Db_Table_Rowset or null
     */
    public function get($id);
    
    /**
     * Action called when a trigger is executed.
     *
     * @param array $data
     */
    public function dispatch($data);
    
}